package psu.kit;

public class ArrayHandler {

    public int handelArray(int[] array) {
        int CountOfZero = 0;
        for (int i = 0; i < array.length; i++) {
            if (array[i] == 0) CountOfZero++;
            else {
                int tmp = array[i];
                array[i] = array[i - CountOfZero];
                array[i - CountOfZero] = tmp;
            }
        }


        return array.length-CountOfZero;
    }
}

